﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PassWordM.aspx.cs" Inherits="HHWeb.SystemManage.Users.PassWordM" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>后台管理-用户密码管理</title>
<link href="../../Css/backCommon.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <input type="hidden" id="Command" name="Command" value="<%=Command %>" />
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td height="30px" background="../../images/tab_05.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="12px" height="30px"><img src="../../images/tab_03.gif" width="12px" height="30px"/></td>
        <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="46%" valign="middle"><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="5%"><div align="center"><img src="../../images/tb.gif" width="16px" height="16px" /></div></td>
                <td width="95%" class="STYLE1"><span class="STYLE3">你当前的位置</span>：[用户管理]-[密码修改]</td>
              </tr>
            </table></td>
            <td width="54%">&nbsp;</td>
          </tr>
        </table></td>
        <td width="16px"><img src="../../images/tab_07.gif" width="16px" height="30px" /></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="8px" background="../../images/tab_12.gif">&nbsp;</td>
        <td>
    <%--Submit数据区头--%>
    <table id="EditArea" border="0" cellpadding="0" cellspacing="0" width="100%">
    <tr><td><span><font color="red">*</font>用户编号:</span></td><td><input type="text"  class="TextCommon" style="width:250px;" id="UserNumber" name="UserNumber" readonly="readonly" value="<%=UserNumber %>" /></td></tr>
    <tr><td><span><font color="red">*</font>用户账号：</span> </td><td><input type="text"  class="TextCommon" style="width:250px;" id="UserCode" name="UserCode" readonly="readonly" value="<%=UserCode %>" /></td></tr>
    <%if (Command == "My")
      {%>
    <tr><td><span><font color="red">*</font>旧密码：</span></td><td><input type="password"  class="TextCommon" style="width:250px;" id="UserPassWord" name="UserPassWord" value="" /></td></tr> 
    <%} %>
    <tr><td><span><font color="red">*</font>新密码：</span></td><td><input type="password" class="TextCommon" style="width:250px;" id="NewPassWord" name="NewPassWord" value="" /></td></tr>
    <tr><td><span><font color="red">*</font>确认新密码：</span></td><td><input type="password"  class="TextCommon" style="width:250px;" name="NewPW" id="NewPW" /></td></tr>
    <tr><td>&nbsp</td><td><input type="button"  id="BTSubmit" name="BTSubmit"  class="Common" value="确定" /></td></tr>
    </table>
     <%--Submit数据区尾--%>
        </td>
        <td width="8px" background="../../images/tab_15.gif">&nbsp;</td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td height="35px" background="../../images/tab_19.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="12px" height="35px"><img src="../../images/tab_18.gif" width="12px" height="35px" /></td>
        <td>
        <%--分页区头--%>
        <%--分页去尾--%>
        </td>
        <td width="16px"><img src="../../images/tab_20.gif" width="16px" height="35px" /></td>
      </tr>
    </table></td>
  </tr>
</table>
</form>
<%--Jquery验证区Start--%>
    <script src="../../Scripts/jquery-1.4.1.min.js" type="text/javascript"></script>
    <script src="../../JS/FormCommon.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(function () {
            $("#BTSubmit").click(function () {
                if ($("#UserNumber").val() == "" || $("#UserNumber").val() == null) {
                    alert("用户编号不能为空！");
                    $("#UserNumber").focus();
                    return "";
                }
                if ($("#UserCode").val() == "" || $("#UserCode").val() == null) {
                    alert("用户帐号不能为空！");
                    $("#UserCode").focus();
                    return "";
                }
                var com = '<%=Command %>'
                if (com == "My") {
                    if ($("#UserPassWord").val() == "" || $("#UserPassWord").val() == null) {
                        alert("旧密码不能为空！");
                        $("#UserPassWord").focus();
                        return "";
                    }
                }
                if ($("#NewPassWord").val() == "" || $("#NewPassWord").val() == null) {
                    alert("新密码不能为空！");
                    $("#NewPassWord").focus();
                    return "";
                }
                if ($("#NewPW").val() == "" || $("#NewPW").val() == null) {
                    alert("确认新密码不能为空！");
                    $("#NewPW").focus();
                    return "";
                }
                if ($("#NewPW").val() != $("#NewPassWord").val()) {
                    alert("两次输入的密码不一样！");
                    $("#NewPW").focus();
                    return "";
                }
                if (confirm("确定修改密码？")) {
                    $("#form1").attr("method", "POST");
                    $("#form1").submit();
                }
            })
        })
    </script>
<%--Jquery验证区End--%>
</body>
</html>

